﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class jsuanmianj
    {
        // 1.定义一个计算图形面积的类，类中定义2个计算面积的方法（重载），
        //分别计算圆面积和长方形面积两个方法。
        //提示：计算圆的面积传半径，计算长方形面积传长和宽。

        private int rrr;
        private int chang;
        private int kuang;

        public int Rrr
        {
            get { return this.rrr; }
            set { this.rrr = value; }
        }

        public int Chang
        {
            get { return this.chang; }
            set { this.chang = value; }
        }
        public int Kuang
        {
            get { return this.kuang; }
            set { this.kuang = value; }
        }
        /// <summary>
        /// 计算长方形面积
        /// </summary>
        /// <param name="num1">长</param>
        /// <param name="num2">宽</param>
        /// <returns></returns>
        public int Jsuan(int num1, int num2)
        {
            return num1 * num2;


        }


        /// <summary>
        /// 计算圆面积
        /// </summary>
        /// <param name="num1">半径</param>
        /// <param name="num2">Π</param>
        /// <returns></returns>
        public double Jsuan(double num1)
        {
            double z = 3.14;
            return (num1 * num1) * z;
        }
    }
}

